﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LimpaGaragem.BLL.Product
{
    public class Rate
    {
        /// <summary>
        /// Return list of rate from product
        /// </summary>
        /// <returns></returns>
        public List<LimpaGaragem.Model.Product.Rate> GetListOfRates(int IDProduct)
        {
            try
            {
                return new LimpaGaragem.DAO.Product.Rate().GetListOfRates(IDProduct);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        /// <summary>
        /// Save rate
        /// </summary>
        public void SaveRate(int IDProduct,
                            int IDUser,
                            int IDScoreRate,
                            string Content)
        {
            try
            {
                new LimpaGaragem.DAO.Product.Rate().SaveRate(IDProduct,
                                                                IDUser,
                                                                IDScoreRate,
                                                                Content);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
    }
}
